
<div style="margin: 0 auto;width: 98%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;color:#006600;">Students Management</div><br/>
<div style="margin: 0 auto;width:60%;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">
    <div style="float: right; border: 0px #ccc solid;"><?php echo anchor('students/manager', img('images/user_images/cancel.png')); ?></div>
    <?php echo form_open('students/edit/' . $this->uri->segment(3)); ?>
    <table border="0" align="center" style="font-weight: lighter;font-size: 14px;">
        <?php
        foreach ($select->result() as $rows) {
            ?>
            <tr>
                <td>Student Name </td>
                <td>: <input type="text" name="txt_studentname" value="<?php echo $rows->stu_name ?>" size="30"></td>
                <td><p style="color:#cc0000;display: none;" >Field name is require!</p></td>
            </tr>

            <tr>
                <td>Student Date of Birth </td>
                <td>: <input type="text" name="text_dob" class="datepicker"  value="<?php echo $rows->stu_dob ?>" /><?php echo form_error('text_dob'); ?></td> 
                <td><p style="color:#cc0000;display: none;">Field name is require!</p></td>
            </tr>
            <tr>
                <td>Student Phone    </td>
                <td>: <input type="text" name="txt_phone" value="<?php echo $rows->stu_telephone ?>" size="30"></td> 
                <td><p style="color:#cc0000;display: none;">Field name is require!</p></td>
            </tr>
            <tr>
                <td>Sex</td>
                <td>
                    :  <select name="studentsex">
                        <option value="">-select sex-</option>
                        <option value="male">Male</option>
                        <option value="female">Female</option>
                    </select>
                </td>  
                <td><p style="color:#cc0000;display: none;">Field name is require!</p></td>
            </tr>
            <tr>
                <td>Student E-mail   </td>
                <td>: <input type="text" name="txt_mail" value="<?php echo $rows->stu_email ?>" size="30"></td>   
                <td><p style="color:#cc0000;display: none;">Field name is require!</p></td>
            </tr>
            <tr>
                <td valign="top">Student Type&nbsp;<span>*</span></td> 
                <td>:
                    <select name="stud_type">
                        <option value="">-Select Student Type-</option>
                        <?php
                        $this->db->select('*');
                        $selectdata = $this->db->get('tbl_stu_type');
                        foreach ($selectdata->result() as $row) {
                            $sel = ($rows->stu_type_id == $row->stu_type_id) ? ' selected="selected"' : '';
                            echo'<option value="' . $row->stu_type_id . '"' . $sel . '>' . $row->stu_type_name . '</option>';
                        }
                        ?>
                    </select> 
                </td>
                <td></td>
            </tr>
            <tr>
                <td>Would you like to be a mailing list?   </td>  

                <?php
                echo '<td>' . form_radio(array('name' => 'mail', 'value' => 'yes')) . 'Yes' . form_radio(array('name' => 'mail', 'value' => 'no')) . 'No' . '</td>';
                ?>

            </tr>
            <tr> 

            <!-- <td>Friend<input type="checkbox" name="friend" value="friend"/>Advertisement<input type="checkbox" name="advertisement" value="advertisement" /></td>-->
                <?php
                echo'<tr>';
                echo '<td>How did you hear about Nataraj Yaga? </td>';
                echo '<td>' . form_radio(array('name' => 'stu_type', 'value' => 'friend')) . 'Friend' . form_radio(array('name' => 'stu_type', 'value' => 'Advertise')) . 'Advertisemet' . form_radio(array('name' => 'stu_type', 'value' => 'internet')) . 'Inernet' . form_radio(array('name' => 'stu_type', 'value' => 'other')) . 'Others' . '</td>';
                echo '</tr>';
                ?>


                <?php
                echo '<tr>';
                echo '<td>Descripton :</td>';
                echo '<td> ' . form_textarea(array('name' => 'txt_description', 'rows' => '8', 'cols' => '50', 'value' => $rows->stu_des)) . '</td>';
                echo'</tr>';
                ?>
                <?php
                echo '<tr>';
                echo '<td></td>';
                echo '<td>' . form_submit(array('name' => 'btn_update', 'type' => 'submit', 'value' => 'Update')) . form_reset(array('type' => 'reset', 'value' => 'Reset')) . '</td>';
                //echo '<td>'.anchor(array('type'=>'button','students/manager'=>'Cansel')).'</td>';
                echo '</tr>';
                ?>
            <?php } ?>
    </table>
    <?php echo form_close(); ?>
</div>